<!-- 采用html5  -->
<!DOCTYPE html>
<html>

<head>

    <meta charset="UTF-8">

    <!-- 页面显示适应移动设备 -->
    <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">

    <title>并夕夕</title>
    <link rel="stylesheet" href="resources\we-vue\style.css">
    <link rel="stylesheet" href="resources\css\font-awesome.min.css">
    <style>

        html{
            height:100%;
        }
        body{
            height:100%;
            padding:0px;/*内边距*/
            margin:0px;/*外边距*/
        }
        
        /* 类选择器 */
        .my-container{
            width:100%;
            height:100%;
            background-color: #f0f0f0;
        }
    </style>

</head>

<body>

    <!-- div ：矩形区域 -->
    <div id="app" class="my-container">

        <wv-header title="并夕夕" :fixed="false" background-color="#ff0033">
            <div slot="left">
                <i class="fa fa-angle-left" @click="window.location.href='index.html'"></i>
            </div>
        </wv-header>

        <div style="padding-left:3px;padding-right:3px;box-sizing: border-box;">

            <wv-group title="服务器设置">
                <wv-input label="IP"  v-model="config.ip"></wv-input>
                <wv-input label="端口"  v-model="config.port"></wv-input>
                <wv-input label="应用"  v-model="config.app"></wv-input>     
            </wv-group>

            <wv-button type="warn" @click="saveConfig" style="margin-top:20px;">保存</wv-button>
        </div>
    </div>

</body>

<script src="resources\js\vue.min.js"></script>
<script src="resources\js\jquery.min.js"></script>
<script src="resources\we-vue\index.js"></script>
<script src="resources\layer_mobile\layer.js"></script>
<script src="resources\js\my.js"></script>

<script>
    //Vue对象的作用就是渲染界面,需要绑定一个元素
    new Vue({
        el: '#app',
        data: {
            config: Serv.serverConfig
        },
        methods: {
            saveConfig() {          
                Serv.setServerConfig(this.config);
                console.log(Serv.serverConfig);
                Toast.success('保存成功！');
                window.location.href = 'index.html';
            },
        }
    });

</script>

</html>